Why You Should Learn C Programming

You've probably heard of C programming or you're wondering whether or not to spend the time learning the language. C programming is defined as one of the most powerful "modern" programming language, in that it allows direct access to memory and many low-level computer operations.

C is one of the lowest level languages that is still fairly readable (compared to binary code with 0's and 1's). It allows you to exploit some of the features of a computer's hardware with far more control and precision that higher level languages. A high level language would be something such as JavaScript or Python, where a significant number of libraries and functions are essentially "pre-built" and take care a lot of under-the-hood functionality but very limited precision or control.

It is important to note that today, most people who "learn to code" focus only on learning higher level languages and never understand what's going on at a fundamental level: how a computer treats data structures and types, how it assigns and manages memory, or how it stores data. If all you want to do is build a website, put a few boxes or forms here and there, then you probably don't need to understand the fundamentals of computer programming or software engineering.

However, if you want to become a software engineer, machine learning or AI engineer, a data scientist, or a full stack developer, understanding data structures and types, memory, performance, and architecture are absolutely vital to being a great engineer.

So why learn C programming?

  1. C programming is extremely versatile, with multiple uses
  2. C programming is the first programming language
  3. C programming is easy to read, write, and learn
  4. C programming developers make great thinking about progarmming
  5. C programming has an incredibly supportive community

01. C programming is extremely versatile, with multiple uses

To become a real software engineer, it is important to understand that, in many ways, the core of engineering is to put 0 and 1 in the best possible place with respect to the computer's memory: it's about performance and optimization. To do that well, you need a good understanding of how the computer puts the 0 and 1 in memory as well as how it executes instructions on the processor. Programming in C forces you to learn memory allocation, data structures and types, how a computer treats and stores different kinds of data, and finally how to manage memory. These are things that you won't get to if you learn only a high-level language.

Let's look at an example of how learning C helps you understand foundational concepts that you wouldn't otherwise cover if learning JavaScript. Your task is to add an element to an array. In JavaScript it looks like this:

array.push(new_element)

In C, however, you have to allocate a new space of memory that corresponds to the size of the array plus one, then you have to copy all elements from the previous memory space, then you can add the new element. Clearly, you have to learn about memory allocation and memory management in order to achieve your task, something that was not at all required in JavaScript.

What is the Process of Learning C?

Here at Qwasar, to help our learners learn C, we start by essentially making "the human understand what is happening inside the computer." It sounds odd, but computers aren't intuitive or creative like humans, and they can't necessarily reason like us: they do exactly what you tell them. We can have trouble understanding this sometimes as humans, but programming in C helps understand how a computer reacts to your code. It will do what you tell it to. It will understand what you have defined and it will not recognize what you have not defined. In some ways, it's about learning to be detail-oriented and systematic.

At the same time, we help learners to understand how a computer treats different kinds of data and allocates different kinds of memory. Qwasar co-founder Kwame Yamgnane commented,

"It is not very easy. It sounds from the outside very easy, you just ask people to put 0 and 1 in memory, which is exactly what we do. It’s a game of life, the rules are very simple, but there are infinite possibilities. It’s a bit like playing chess, the basic rules are kind of easy. I can ask you what you can do with the king or the queen, even if you take go, it’s even simpler, but at the end, the amount of possibilities are endless."

Once you've got the basics down, then we move on to the fun and more challenging part of programming: being able to combine fundamental elements and concepts to create a more complex and advanced application. The challenge is often that the possibilities are infinite: literally the number of combinations and ways of building or doing something are endless, which is where we start to get into software design, architecture, and decision-making when building software applications. This requires both systematic thinking, design thinking, creativity, structure, and being able to break down a complex problem into smaller blocks or functions.

Eventually, the projects at Qwasar become more complex in C such that you're rebuilding memory allocation or shell. At this point, you're becoming a software engineer and learning how to build software that optimally runs with a computer's hardware, combining your foundational knowledge of how a computer works.